<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>PublishInfo | hap-nodejs</title>
	<meta name="description" content="Documentation for hap-nodejs">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
	<script async src="../assets/js/search.js" id="search-script"></script>
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading">Preparing search index...</li>
						<li class="state failure">The search index is not available</li>
					</ul>
					<a href="../index.html" class="title">hap-nodejs</a>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="../modules.html">hap-nodejs</a>
				</li>
				<li>
					<a href="publishinfo.html">PublishInfo</a>
				</li>
			</ul>
			<h1>Interface PublishInfo</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-8 col-content">
			<section class="tsd-panel tsd-hierarchy">
				<h3>Hierarchy</h3>
				<ul class="tsd-hierarchy">
					<li>
						<span class="target">PublishInfo</span>
					</li>
				</ul>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Properties</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#addidentifyingmaterial" class="tsd-kind-icon">add<wbr>Identifying<wbr>Material</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#advertiser" class="tsd-kind-icon">advertiser</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#bind" class="tsd-kind-icon">bind</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#category" class="tsd-kind-icon">category</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#mdns" class="tsd-kind-icon">mdns</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#pincode" class="tsd-kind-icon">pincode</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#port" class="tsd-kind-icon">port</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#setupid" class="tsd-kind-icon">setupID</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#uselegacyadvertiser" class="tsd-kind-icon">use<wbr>Legacy<wbr>Advertiser</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="publishinfo.html#username" class="tsd-kind-icon">username</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Properties</h2>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="addidentifyingmaterial" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> add<wbr>Identifying<wbr>Material</h3>
					<div class="tsd-signature tsd-kind-icon">add<wbr>Identifying<wbr>Material<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L259">lib/Accessory.ts:259</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>If this option is set to true, HAP-NodeJS will add identifying material (based on <a href="publishinfo.html#username">username</a>)
								to the end of the accessory display name (and bonjour instance name).
							Default: true</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="advertiser" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> advertiser</h3>
					<div class="tsd-signature tsd-kind-icon">advertiser<span class="tsd-signature-symbol">:</span> <a href="../enums/mdnsadvertiser.html" class="tsd-signature-type" data-tsd-kind="Enumeration">MDNSAdvertiser</a></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L263">lib/Accessory.ts:263</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Defines the advertiser used with the published Accessory.</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="bind" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> bind</h3>
					<div class="tsd-signature tsd-kind-icon">bind<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L243">lib/Accessory.ts:243</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Defines the host where the HAP server will be bound to.
								When undefined the HAP server will bind to all available interfaces
							(see <a href="https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback">https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback</a>).</p>
						</div>
						<p>This property accepts a mixture of IPAddresses and network interface names.
						Depending on the mixture of supplied addresses/names hap-nodejs will bind differently.</p>
						<p>It is advised to not just bind to a specific address, but specifying the interface name
						in oder to bind on all address records (and ip version) available.</p>
						<p>HAP-NodeJS (or the underlying ciao library) will not report about misspelled interface names,
						as it could be that the interface is currently just down and will come up later.</p>
						<p>Here are a few examples:</p>
						<ul>
							<li><p>bind: &quot;::&quot;
									Pretty much identical to not specifying anything, as most systems (with ipv6 support)
								will default to the unspecified ipv6 address (with dual stack support).</p>
							</li>
							<li><p>bind: &quot;0.0.0.0&quot;
									Binding TCP socket to the unspecified ipv4 address.
								The mdns advertisement will exclude any ipv6 address records.</p>
							</li>
							<li><p>bind: [&quot;en0&quot;, &quot;lo0&quot;]
									The mdns advertising will advertise all records of the en0 and loopback interface (if available) and
									will also react to address changes on those interfaces.
									In order for the HAP server to accept all those address records (which may contain ipv6 records)
								it will bind on the unspecified ipv6 address &quot;::&quot; (assuming dual stack is supported).</p>
							</li>
							<li><p>bind: [&quot;en0&quot;, &quot;lo0&quot;, &quot;0.0.0.0&quot;]
									Same as above, only that the HAP server will bind on the unspecified ipv4 address &quot;0.0.0.0&quot;.
								The mdns advertisement will not advertise any ipv6 records.</p>
							</li>
							<li><p>bind: &quot;169.254.104.90&quot;
									This will bind the HAP server to the address 0.0.0.0.
									The mdns advertisement will only advertise the A record 169.254.104.90.
									If the given network interface of that address encounters an ip address change (to a different address),
									the mdns advertisement will result in not advertising a address at all.
									So it is advised to specify a interface name instead of a specific address.
								This is identical with ipv6 addresses.</p>
							</li>
							<li><p>bind: [&quot;169.254.104.90&quot;, &quot;192.168.1.4&quot;]
									As the HAP TCP socket can only bind to a single address, when specifying multiple ip addresses
									the HAP server will bind to the unspecified ip address (0.0.0.0 if only ipv4 addresses are supplied,
									:: if a mixture or only ipv6 addresses are supplied).
									The mdns advertisement will only advertise the specified ip addresses.
									If the given network interface of that address encounters an ip address change (to different addresses),
									the mdns advertisement will result in not advertising a address at all.
								So it is advised to specify a interface name instead of a specific address.</p>
							</li>
						</ul>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="category" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> category</h3>
					<div class="tsd-signature tsd-kind-icon">category<span class="tsd-signature-symbol">:</span> <a href="../enums/categories.html" class="tsd-signature-type" data-tsd-kind="Enumeration">Categories</a></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L190">lib/Accessory.ts:190</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Specify the category for the HomeKit accessory.
								The category is used only in the mdns advertisement and specifies the devices type
								for the HomeKit controller.
								Currently this only affects the icon shown in the pairing screen.
								For the Television and Smart Speaker service it also affects the icon shown in
							the Home app when paired.</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="mdns" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> mdns</h3>
					<div class="tsd-signature tsd-kind-icon">mdns<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">MulticastOptions</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L253">lib/Accessory.ts:253</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Used to define custom MDNS options. Is not used anymore.</p>
						</div>
						<dl class="tsd-comment-tags">
							<dt>deprecated</dt>
							<dd></dd>
						</dl>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="pincode" class="tsd-anchor"></a>
					<h3>pincode</h3>
					<div class="tsd-signature tsd-kind-icon">pincode<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L181">lib/Accessory.ts:181</a></li>
						</ul>
					</aside>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="port" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> port</h3>
					<div class="tsd-signature tsd-kind-icon">port<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L248">lib/Accessory.ts:248</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Defines the port where the HAP server will be bound to.
							When undefined port 0 will be used resulting in a random port.</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="setupid" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> setupID</h3>
					<div class="tsd-signature tsd-kind-icon">setupID<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L191">lib/Accessory.ts:191</a></li>
						</ul>
					</aside>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="uselegacyadvertiser" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> use<wbr>Legacy<wbr>Advertiser</h3>
					<div class="tsd-signature tsd-kind-icon">use<wbr>Legacy<wbr>Advertiser<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L268">lib/Accessory.ts:268</a></li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Use the legacy bonjour-hap as advertiser.</p>
						</div>
						<dl class="tsd-comment-tags">
							<dt>deprecated</dt>
							<dd></dd>
						</dl>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="username" class="tsd-anchor"></a>
					<h3>username</h3>
					<div class="tsd-signature tsd-kind-icon">username<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/homebridge/HAP-NodeJS/blob/95a2490/src/lib/Accessory.ts#L180">lib/Accessory.ts:180</a></li>
						</ul>
					</aside>
				</section>
			</section>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class=" ">
						<a href="../modules.html">Exports</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-interface">
						<a href="publishinfo.html" class="tsd-kind-icon">Publish<wbr>Info</a>
						<ul>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#addidentifyingmaterial" class="tsd-kind-icon">add<wbr>Identifying<wbr>Material</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#advertiser" class="tsd-kind-icon">advertiser</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#bind" class="tsd-kind-icon">bind</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#category" class="tsd-kind-icon">category</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#mdns" class="tsd-kind-icon">mdns</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#pincode" class="tsd-kind-icon">pincode</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#port" class="tsd-kind-icon">port</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#setupid" class="tsd-kind-icon">setupID</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#uselegacyadvertiser" class="tsd-kind-icon">use<wbr>Legacy<wbr>Advertiser</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="publishinfo.html#username" class="tsd-kind-icon">username</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer>
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>